/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package group6renderer;

import group6renderer.renderernode.*;

/**
 *
 * @author jonnie
 */
public class Group6Renderer
{

	TreeNode tree;
	Group6Renderer()
	{
		TreeNode tree=new BoldNode();
		tree.addChild(new TextNode("This text must be bold"));
		tree.addChild(new ItalicNode());
		tree.getChild(2).addChild(new TextNode("This text must be bold and italic"));
		tree.addChild(new TextNode("This text must be bold only"));
		
	}
	
	
	
    /**
     * @param args the command line arguments
     */
   public static void main(String[] args)
    {
	  
	   /*
	   TreeNode tree=new HtmlNode();
	  tree.addChild(new TitleNode());
	  tree.addChild(new BodyNode());
	   tree.getChild(1).addChild(new BoldNode());
	   tree.getChild(1).getChild(0);
	   

		tree.getChild(1).getChild(0).addChild(new TextNode("This text must be bold"));
		tree.getChild(1).getChild(0).addChild(new ItalicNode());
		tree.getChild(1).getChild(0).getChild(1).addChild(new TextNode("This text must be bold and italicfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"));
		tree.getChild(1).getChild(0).getChild(1).addChild(new CenterNode());
		tree.getChild(1).getChild(0).getChild(1).getChild(1).addChild(new TextNode("This text must be bold and italic and centered"));
		tree.getChild(1).getChild(0).addChild(new TextNode("This text must be bold only"));
		tree.getChild(1).getChild(0).addChild(new BlockQuoteNode());
		tree.getChild(1).getChild(0).getChild(3).addChild(new TextNode("This text must be intenteded and bold\n yes it must be"));
		tree.getChild(1).getChild(0).getChild(3).addChild(new ItalicNode());
		tree.getChild(1).getChild(0).getChild(3).getChild(1).addChild(new UnderLineNode());
		tree.getChild(1).getChild(0).getChild(3).getChild(1).getChild(0).addChild(new TextNode("This text must be bold,intenteded, italic and underlined\n yes it must be"));
		tree.getChild(1).getChild(0).getChild(3).addChild(new TextNode("This text must  ONLY be intenteded and bold\n yes it must be"));
		tree.getChild(1).getChild(0).addChild(new TextNode("This text must be bold only"));
	    tree.getChild(1).getChild(0).addChild(new PreNode());
	    tree.getChild(1).getChild(0).getChild(5).addChild(new TextNode("This text must be bold  and monospaced"));
	    tree.getChild(1).getChild(0).addChild(new TextNode("This text must be bold only"));
	    tree.getChild(1).getChild(0).addChild(new HeadingNode("h3"));
	    tree.getChild(1).getChild(0).addChild(new TextNode("This text must be bold  and h3"));
	    tree.getChild(1).getChild(0).addChild(new HeadingNode("h3"));
	    tree.getChild(1).getChild(0).addChild(new TextNode("This text must be bold  and h3+1"));
	    tree.getChild(1).getChild(0).addChild(new HeadingNode("h7"));
	    tree.getChild(1).getChild(0).addChild(new TextNode("This text must be bold  and h3+1+h7"));
	    tree.getChild(1).getChild(0).addChild(new HeadingNode("h3"));
	    tree.getChild(1).getChild(0).addChild(new TextNode("This text must be bold  and h3+3"));
	    tree.getChild(1).getChild(0).addChild(new TextNode("This text must be bold ONLY"));
	   
	    */
	    
	   HTMLConstants.buildHTMLConstants();
	   String html="<html><head><title>This is the title of the HTML file</title></head><body><b>this   must be bold<i>this must be bold and italic<center>this must be bold italic and centered</i></center><left> centered and bold </left><right>this must be BOLD IN the RIGHT</right></b><center>this <left>is PLAIN</left> centered</center>PLAIN<blockquote>this must be intenteded<h1>heading 1<h2> heading 2<h2>heading 22<i><b>this text must be bold italic and intentended</blockquote><right>bold <center>and <left>italic</center></i></b>PLAIN<u>this must             be UNDERLINE!!<b>this must be BOLD and UNDERLINED</body></html></b>";
	   Parser theParser = new Parser(html);
	   TreeNode treeRoot=theParser.parse();
	   Renderer theRenderer=new Renderer(treeRoot);
	     
	   
    }   
}
